package com.baseweb.webadmin.core.constants;

import java.util.ArrayList;
import java.util.List;

public enum RoleType {
    SUPER_ADMIN(1,"超级管理员"), ADMIN(5,"区域加盟商"), TEAM_BIZ(4,"团队商家"), NORMAL_BIZ(3,"普通商家"), NORMAL_USER(2,"普通用户");

    private int code;
    private String name;
    RoleType(int code, String name){
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static List<RoleType> getAllData(){
        List<RoleType> result = new ArrayList<RoleType>();
        for (RoleType current : RoleType.values())
        {
            result.add(current);
        }
        return result;
    }

//    public static void main(String[] args) {
//        for(ChannelType c : getAllChannel()){
//            System.out.print(c.getName());
//        }
//    }
}
